package day03;
//赋值运算符
public class OperDemo4 {
    public static void main(String[] args) {

        int a =5;
        a += 10;//相当于 a = (int)(a + 10)
        System.out.println(a); //15
        a *= 2;
        System.out.println(a);//30
        a /= 6;
        System.out.println(a);//5

        //面试题
        short s = 5;
        //s =(int)(s +10);// 编译错误 short类型参与运算时会先转成int，然后再运算，所以需要加强转
        s += 10;//自带强转
    }
}
